//
//  Common.swift
//  JAWeiBo
//
//  Created by Arvin on 17/4/4.
//  Copyright © 2017年 Arvin. All rights reserved.
//

import UIKit

//MARK: - 登录相关
let appKey = "3459347103"
let appSecrect = "c1640ea701b8cca3f5ed8d009df6fb7e"
let redirectURI = "https://github.com/2194725650"
let wbuserName = "529390944@qq.com" //账号
let wbPassword = ""   //密码
//let appKey = "3663413293"
//let appSecrect = "06b3bd3bd662578002e30247a9fb6f8b"
//let redirectURI = "http://www.baidu.com"
//let wbuserName = "dxusdcom@163.com"
//let wbPassword = "518518"

//MARK: - 和rect相关
let screenBounds = UIScreen.main.bounds
let screenWidh = screenBounds.width
let screenHeight = screenBounds.height
let screenScale = UIScreen.main.scale //缩放比例

//MARK: - UI相关
let globalColor: UIColor = UIColor.orange

//MARK: - 全局的通知
//登录成功的通知
let loginSuccessNotification = Notification.Name(rawValue: "loginSuccessNotification")

//点击配图视图的单张图片的通知
let pictureViewClickedNotification = Notification.Name(rawValue: "pictureViewClickedNotification")

//点击表情键盘的按钮的通知
let emotionButtonClickedNotification = Notification.Name(rawValue: "emotionButtonClickedNotification")


//MARK: - 首页的cell分割颜色
let home_CellColor = UIColor(white: 0.8, alpha: 1.0)

//MARK: - 延迟执行的全局的方法
/// 延迟执行的方法
///
/// - Parameters:
///   - seconds: 秒数
///   - afterToDo: 需要延迟执行的闭包(就是需要延迟执行的那件事)
func after(_ seconds: Int, _ afterToDo: @escaping ()->()) {
    let deadlineTime = DispatchTime.now() + .seconds(seconds)
    DispatchQueue.main.asyncAfter(deadline: deadlineTime) { 
        afterToDo()
    }
    
}

